<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 6/6/21
 * Time: 4:45 PM
 */

namespace app\api\model;


use think\model\concern\SoftDelete;

class ProductOrderContent extends BaseModel
{
    use SoftDelete;

    public function img()
    {
        return $this->belongsTo('Image','img_id','id');
    }

    public function product()
    {
        return $this->belongsTo('Product','product_id','id');
    }

    public function getProductStartTimeAttr($value)
    {
        return date('Y-m-d H:i:s',$value);
    }

    public function getProductEndTimeAttr($value)
    {
        return date('Y-m-d H:i:s',$value);
    }
}